for ii in $(find *.root -type l)
do
unlink $ii
done

id=$1

mcid=$( expr $id + 50 )

for ii in $(find  ../RenorWOele/*ID$mcid*Comb*.root  ../RenorWOele/*ID$id*Comb*.root ../RenorWOele/*directMC_id$mcid\.root )
do 
    echo $ii
    ff=$(basename $ii)
    ln -s $ii $ff
done

#for cmpTPC
for ii in $(find ../../g25finish/Beta22*/RenorWOele/*cmpEta*GrID$id*.root ../../g25finish/Beta22*/RenorWOele/*cmpEta*GrID$mcid*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii 
done

exit

#cmpBeta
for ii in $(find ../Beta22*/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii Beta22$ff
done

exit



exit

exit

for ii in $(find ../Beta22_Xmin-9_rb1_2154/RenorWOele/*cmpEta*GrID$id*.root)
do
    echo $ii
    ff=$(basename $ii)
    ln -s $ii rb1$ff
done

exit

